<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    
    <h:head>
        <title>Meteocal | Export</title>
        <h:outputStylesheet name="css/style.css" />
    </h:head>
    
    <h:body>
        <div id="container">
            
            <div id="sidebar">
                <h:form>
                    <p:poll interval="15" listener="#{notificationCheckBean.check()}" />
                    <p:menu model="#{menuBean.model}" style="min-height: 615px;"/>
                </h:form>                      
            </div>

            <div id="content">
               <h:form>
                 <p:growl id="gro" life="7000" showDetail="true" globalOnly="true" autoUpdate="true"/>
                 <p:panel styleClass="default" style="min-height: 600px;">
                     <h:panelGrid columns="2">
                        <p:outputLabel value="Number of your events: " style="font-style: italic"/>
                        <p:outputLabel value="#{expimpBean.nevents}" />
                        <p:outputLabel value="Number of your participations: " style="font-style: italic"/>
                        <p:outputLabel value="#{expimpBean.nparts} " />
                     </h:panelGrid>     
                     <p:commandButton  value="Download your backup"  icon="ui-icon-arrowthickstop-1-n" ajax="false" onclick="PrimeFaces.monitorDownload(start, stop);" >
                     <p:fileDownload value="#{expimpBean.export()}" />
                     </p:commandButton>
                 </p:panel>
                </h:form>
            </div>

        </div>
    </h:body>
</html>